#ifndef _ORBITHANDLER_H_
#define _ORBITHANDLER_H_
#include <SEEdit/EventHandlers/CameraEventHandler.h>
#include <glm/glm.hpp>

namespace SEngine
{
    class OrbitHandler : public CameraEventHandler
    {
    public:
        OrbitHandler(EnableEventHandle & enHandle, Camera & camera);
        virtual ~OrbitHandler() = default;
    
        virtual void OnEvent(EventPtr) override;
        virtual void OnUpdate(int delta) override;
    
    protected:
        void OnMousePressEvent(MousePressEventPtr);
        void OnMouseReleaseEvent(MouseReleaseEventPtr);
        void OnMouseMoveEvent(MouseMoveEventPtr);
        void OnMouseWheelEvent(MouseWheelEventPtr);

    private:
        float m_rotateSpeed{0.05f};
        glm::vec3 m_targetPos{0.0f};
        glm::vec2 m_lastPos{0.0f};
        float m_delta;
    };
} // namespace SEngine


#endif